package hk.linkcredit.walletservice.constant;

import lombok.Getter;

/**
 * <p>
 * 状态码封装
 * </p>
 *
 * @author yangkai.shen
 * @date Created in 2018-10-02 21:02
 */
@Getter
public enum Status {
    /**
     * 操作成功
     */
    OK(200, "操作成功"),

    /**
     * 未知异常
     */
    UNKNOWN_ERROR(500, "服务器出错啦"),

    // 100000 系统异常
    SYSTEM_ERR(100001, "Bad connection.Please try again."),
    // REQUEST_ERR(100002", "网络异常，请稍候重试"),
    REQUEST_ERR(100002, "Internet exception, Please try again."),
    // SYSTEM_BUSY(100003", "系统繁忙，请稍候重试"),
    SYSTEM_BUSY(100003, "System is busy.Please try again."),
    // ip地址错误，请更换IP地址。
    // NOT_WHITE_IP(100004, "请求地址不在白名单内"),
    NOT_WHITE_IP(100004, "IP address error, please change the IP address."),
    SYSTEM_EXCEPTION(100005, "System abnormal, please try again later."),

    // 200000 网络异常
    // 300000 业务系统
    // 钱包 wallet,
    BALANCE_LOCK_CANNOT_WITHDRAW(300001, "The balance is locked, sorry that you cannot withdraw cash temporarily, please contact customer service"),
    BONUS_LOCK_CANNOT_WITHDRAW(300002, "The bonus is locked, sorry that you cannot withdraw cash temporarily, please contact customer service"),
    WALLE_WITHDRAW_ZERO(300003, "Please enter an amount greater than 0"),
    WALLE_WITHDRAW_CANNOT_LOWER_MIN_BALANCE(300004, "Not less than the minimum withdrawal balance"),
    WALLE_WITHDRAW_CANNOT_LOWER_MIN_BONUS(300005, "Not less than the minimum withdrawal bonus"),
    WALLE_WITHDRAW_INSUFFICIENT_BALANCE(300006, "Insufficient balance"),
    WALLE_WITHDRAW_INSUFFICIENT_BONUS(300007, "Insufficient bonus"),
    WALLE_WITHDRAW_TYPE_CANNOT_SUPPORT(300008, "Unsupported withdrawal type"),
    WALLE_ORDER_TYPE_CANNOT_SUPPORT(300009, "Unsupported order type"),
    WALLE_WITHDRAW_ERROR(300010, "Withdrawal operation network is busy, please try again later."),
    WALLE_ORDER_OPERATE_ERROR(300011, "Order operation exception, please try again later."),
    WALLET_ORDER_IS_NOT_EXISTS(300012, "Order does not exist"),
    WALLET_ORDER_STATUS_EXPIRED(300013, "Order status has expired"),
    WALLE_ORDER_STATUS_CANNOT_SUPPORT(300014, "Unsupported order status"),
    WALLE_ACCOUN_NOT_EXIST(300015, "Wallet account does not exist"),
    WALLE_TYPE_CANNOT_SUPPORT(300016, "Unsupported funds type"),
    WALLE_REPAYMENT_ERROR(300017, "Repayment operation network is busy, please try again later."),

    WALLE_OPERATE_ERROR(300018, "Wallet operation network is busy, please try again later.");


    /**
     * 状态码
     */
    private Integer code;
    /**
     * 内容
     */
    private String message;

    Status(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
